import { defineStore } from 'pinia'
import { ref } from 'vue'
import { getCategoryApi } from '../apis/layout'

export const useCategoryStore = defineStore('category', () => {
  const categoryList = ref([])
  const getCategory = async () => {
    const { result } = await getCategoryApi()
    categoryList.value = result
  }
  return { categoryList, getCategory }
})
